import request from '@/utils/request'

export default {

  // 分页查询
  findPage: params => request('/api/ucenter/admin/page', {
    method: 'get',
    params,
  }),

  // 添加
  add: data => request('/api/ucenter/admin', {
    method: 'post',
    data,
  }),

  // 编辑
  edit: (id, data) => request(`/api/ucenter/admin/${id}`, {
    method: 'put',
    data,
  }),

  // 重置密码
  resetPassword: (id, data) => request(`/api/ucenter/admin/${id}/resetPassword`, {
    method: 'POST',
    data,
  }),

  // 冻结
  freeze: (id, data) => request(`/api/ucenter/admin/${id}/freeze`, {
    method: 'POST',
    data,
  }),

  // 解冻
  unFreeze: id => request(`/api/ucenter/admin/${id}/unFreeze`, {
    method: 'POST',
  }),
}
